package com.hotel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ht_commodity
 */
@TableName(value ="ht_commodity")
@Data
public class HtCommodity implements Serializable {
    /**
     * 商品编号
     */
    @TableId
    private Long commodityNo;

    /**
     * 商品名称
     */
    private String commodityName;

    /**
     * 商品类别
     */
    private Long categoryNo;

    /**
     * 价格
     */
    private Double commodityPrice;

    /**
     * 单位
     */
    private String commodityDwey;

    /**
     * 备注
     */
    private String commodityRemark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HtCommodity other = (HtCommodity) that;
        return (this.getCommodityNo() == null ? other.getCommodityNo() == null : this.getCommodityNo().equals(other.getCommodityNo()))
            && (this.getCommodityName() == null ? other.getCommodityName() == null : this.getCommodityName().equals(other.getCommodityName()))
            && (this.getCategoryNo() == null ? other.getCategoryNo() == null : this.getCategoryNo().equals(other.getCategoryNo()))
            && (this.getCommodityPrice() == null ? other.getCommodityPrice() == null : this.getCommodityPrice().equals(other.getCommodityPrice()))
            && (this.getCommodityDwey() == null ? other.getCommodityDwey() == null : this.getCommodityDwey().equals(other.getCommodityDwey()))
            && (this.getCommodityRemark() == null ? other.getCommodityRemark() == null : this.getCommodityRemark().equals(other.getCommodityRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCommodityNo() == null) ? 0 : getCommodityNo().hashCode());
        result = prime * result + ((getCommodityName() == null) ? 0 : getCommodityName().hashCode());
        result = prime * result + ((getCategoryNo() == null) ? 0 : getCategoryNo().hashCode());
        result = prime * result + ((getCommodityPrice() == null) ? 0 : getCommodityPrice().hashCode());
        result = prime * result + ((getCommodityDwey() == null) ? 0 : getCommodityDwey().hashCode());
        result = prime * result + ((getCommodityRemark() == null) ? 0 : getCommodityRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", commodityNo=").append(commodityNo);
        sb.append(", commodityName=").append(commodityName);
        sb.append(", categoryNo=").append(categoryNo);
        sb.append(", commodityPrice=").append(commodityPrice);
        sb.append(", commodityDwey=").append(commodityDwey);
        sb.append(", commodityRemark=").append(commodityRemark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}